<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>修改单</title>
    <jsp:include page="/static/common/common_header.jsp"></jsp:include>
    <style>
        tr {
            color: #3c3c3c;
            font-family: Arial,"Microsoft YaHei","微软雅黑";
            font-size: 12px;
            font-style: normal;
        }
    </style>
    <script type="text/javascript" src="/static/js/policy/changing.js"></script>
</head>
<body>
<table id="temporary_datagrid"></table>
<div id="temporary_toolbar">
    <%--<shiro:hasPermission name="temporaryloyee:save">&lt;%&ndash;使用shiro标签判断当前用户是否有对应权限,来决定是否显示对应的按钮&ndash;%&gt;
        <a class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="add">新增</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="edit">编辑</a>
    </shiro:hasPermission>--%>
    <form id="temporary_form" method="post">
       <%-- <a id="btn_changeState" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="refuse">拒保</a>--%>
      <%--  <a id="btn_putUp" class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="putUp">提审</a>
        <a id="btn_edit" class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="edit">编辑</a>--%>
        <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-cmd="reload">刷新</a>
        投保人: <input class="easyui-textbox" name="customerName">
        保单编号: <input class="easyui-textbox" name="policySn">
        <a type="button" class="easyui-linkbutton"
               iconCls="icon-search" plain="true" onclick="searchTemporary();" >查询</a>
    </form>
</div>

<div id="temporary_btns">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="temporary_submit();">保存</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancel">取消</a>
</div>
<div id="temporary_dialog">
    <form id="form" method="post">
        <div id="p" class="easyui-panel" style="width: 780px;height: 350px;">
            <div id="aa" class="easyui-accordion" data-options="fit:true,multiple:true,selected:true">
                <div id="accord1" title="投保人" style="overflow:auto;padding:10px;">
                    <table>
                        <!--拿到的保险产品的id-->
                        <input type="hidden" name="customer.id"/>
                        <input type="hidden" name="car.id"/>
                        <tr style="height: 40px;">
                            <td>姓名</td>
                            <td width="100px"><input class="easyui-validatebox textbox"  name="customer.name" data-options="required:true,validType:'length[3,10]'"></td>
                            <td align="left">性别</td>
                            <td width="100px">
                                <select name="customer.gender" class="easyui-combobox"
                                        data-options="panelHeight:'auto',width:'60px'">
                                    <option value="1">男</option>
                                    <option value="0">女</option>
                                </select>
                            </td>
                            <td>身份证</td>
                            <td width="100px">
                                <input name="customer.idNo" class="easyui-validatebox textbox" style="width: 152px;height: 30px;"
                                       data-options="required:true,validType:'idcard'"/>
                            </td>
                        </tr>
                        <tr style="height: 40px;">
                            <td>联系方式</td>
                            <td>
                                <input class="easyui-validatebox textbox" style="width: 152px;height: 30px;" name="customer.tel" data-options="required:true,validType:'mobile'"/>
                            </td>
                        </tr>
                        <tr style="height: 40px;">
                            <td>通讯地址</td>
                            <td>
                                <input id="address" name="customer.address"
                                       class="easyui-textbox" style="width: 300px"/>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="accord2" title="车辆信息" data-options="multiple:true,selected:false" style="padding:10px;">
                    <table>
                        <tr style="height: 40px;">
                            <td width="60px">车主姓名</td>
                            <td width="180px">
                                <input class="easyui-textbox" style="width: 150px;" type="text" name="car.customer.name" id="car.customer.name"
                                       data-options="required:true"/>
                            </td>
                            <td>品牌</td>
                            <td width="180px">
                                <input id="carbrand" class="easyui-textbox" style="width: 150px;" name="car.brand"/>
                            </td>
                            <td>型号</td>
                            <td width="180px">
                                <input id="carmodel" name="car.model" style="width: 150px;" class="easyui-textbox"/>
                            </td>
                        </tr>
                        <tr style="height: 40px;">
                            <td>车牌号码</td>
                            <td>
                                <input id="carplateNumber" name="car.plateNumber" class="easyui-validatebox textbox" data-options="required:true"
                                       style=" width: 150px"/>
                            </td>
                            <td>排气量</td>
                            <td>
                                <input id="cargasDisplacement" name="car.gasDisplacement" style="width: 150px;" class="easyui-textbox"/>L
                            </td>
                            <td>汽车分类</td>
                            <td>
                                <select class="easyui-combobox" name="car.category" id="carcategory" style="width:150px;"
                                        data-options="panelHeight:'auto'">
                                    <option value="1">载客</option>
                                    <option value="2">载物</option>
                                </select>
                            </td>
                        </tr>
                        <tr style="height: 40px;">
                            <td>购置日期</td>
                            <td>
                                <input name="car.purchaseDate" id="carpurchaseDate" style="width:150px;"
                                       class="easyui-datebox"/>
                            </td>
                            <td>市场估价</td>
                            <td>
                                <input  name="car.valuation" id="carvaluation" class="easyui-textbox" style="width:150px;"/>万
                            </td>
                            <td>车载大小</td>
                            <td>
                                <select class="easyui-combobox" id="carsize" name="car.size" style="width:150px;"
                                        data-options="panelHeight:'auto'">
                                    <option value="0">小型</option>
                                    <option value="1">中型</option>
                                    <option value="2">大型</option>
                                    <option value="3">超大型</option>
                                </select>
                            </td>
                        </tr>
                    </table>

                </div>
                <div id="accord3" title="保险产品" data-options="multiple:true,selected:false" style="padding:10px;">
                    <table>
                        <tr>
                            <td >承包机构</td>
                            <td>
                                <input id="safe_select" name="safetyMechanism.id" style="width:200px;"/>
                                <a class="easyui-linkbutton"
                                   data-options="iconCls:'icon-xinzeng'" data-cmd="add_product">添加产品</a>
                            </td>
                            <td>保险时长</td>
                            <td>
                                <input name="duration" style="width: 40px;" id="duration" class="easyui-validatebox textbox" data-options="required:true" onchange="calculate();"/>年
                            </td>
                        </tr>
                        </table>
                    <table>
                        <tr id="hidethis" class="product-tr" data-oid="-1">
                            <td width="70px">保险产品:</td>
                            <td id="productName" width="200px">防碰瓷险</td>
                            <td width="70px">产品编号:</td>
                            <td id="productSn" width="200px">5464</td>
                            <td width="70px">保险年费:</td>
                            <td id="annuaFlee" class="annuaFlee" width="150px">0</td>
                            <td><a class="easyui-linkbutton"
                                   data-options="iconCls:'icon-shanchu'" plain="true" onclick="delete_this(this);"></a></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td valign="bottom"><font>总计: </font></td>
                            <td valign="bottom"><font color="red" size="10" id="totalAmount">0</font></td>
                            <td valign="bottom"><font>元</font></td>
                        </tr>
                    </table>
                </div>
            </div>

        </div>

    </form>
    <div id="choose_product_dialog">
        <table id="product_datagrid"></table>
    </div>

    <div id="product_btns2">
        <a class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="select_product">确定</a>
    </div>
</div>

</body>
</html>
